In [3]:
from bokeh.charts import Histogram
from bokeh.plotting import figure, output_notebook, show
from git import Repo
output_notebook()
Open up a repo
In [4]:
repo = Repo('/users/sixtynorth/projects/cosmic-ray')
Plot a histogram of the commit message lengths for the repo
In [5]:
lengths = [len(c.message) for c in repo.iter_commits('master')]
fig = figure(title="Commit message lenghts", x_axis_label='count', y_axis_label='size')
hist = Histogram(lengths, bins=100, legend=True)
Show it!
In [6]:
show(hist)
In [9]:
print(repo.head.commit.diff('HEAD~1'))
In [ ]: